package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzyl.nursing.domain.Reservation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 预约信息Mapper接口
 * 
 * @author ruoyi
 */
@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {

    /**
     * 查询用户在指定时间段内取消的预约数量
     *
     * @param userId
     * @param startTime
     * @param endTime
     * @return
     */
    int selectcountCancelledByUserAndTime(@Param("userId")Long userId,  @Param("startTime")LocalDateTime startTime,  @Param("endTime")LocalDateTime endTime);

    /**
     * 查询用户预约列表
     */
    List<Reservation> selectReservationList(Reservation reservation);
}
    